home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-30 | 2.6 KB | 129 lines | [TEXT/KAHL] |
- #include <Constants.h>
- #include <Global.h>
- #include <Commands.h>
-
- #include <CApplication.h>
- #include <CBartender.h>
- #include <TBUtilities.h>
-
- #include <CExpander.h>
- #include <CExpanderLabel.h>
- #include <CExpanderList.h>
- #include <CExpanderPane.h>
- #include <CExpandorama.h>
-
- #include "CApp.h"
- #include "CMain.h"
-
-
- extern CApplication *gApplication; /* The application */
- extern CDesktop *gDesktop;
- extern CDecorator *gDecorator;
-
-
- TCL_DEFINE_CLASS_D1( CMain, x_CMain );
-
-
- CMain :: CMain() : x_CMain()
- {
- TCL_END_CONSTRUCTOR
- }
-
-
- CMain :: ~CMain()
- {
- TCL_START_DESTRUCTOR
- }
-
-
- void CMain :: ICMain( void )
- {
- Ix_CMain();
- }
-
-
- void CMain :: PositionWindow( void )
- {
- ;
- }
-
-
- void CMain :: MakeNewWindow( void )
- {
- short eachLevel1, eachLevel2, eachLevel3;
- short margin = 5;
- LongRect aFrame;
-
- itsWindow = TCL_NEW( CWindow, ( 500, FALSE, this ) );
-
- CScrollPane *aScrollPane = TCL_NEW( CScrollPane, ( itsWindow, this, 0, 0, 0, 0,
- sizELASTIC, sizELASTIC, TRUE, TRUE, TRUE) );
- aScrollPane->FitToEnclFrame( TRUE, TRUE );
- aScrollPane->GetInterior( &aFrame );
-
- CExpandorama *aPanorama = TCL_NEW( CExpandorama, ( aScrollPane, this,
- aFrame.right - aFrame.left - ( margin << 1 ),
- aFrame.bottom - aFrame.top - ( margin << 1 ),
- margin, margin, sizELASTIC, sizELASTIC ) );
- aScrollPane->InstallPanorama( aPanorama );
-
- CExpanderList *topList = TCL_NEW( CExpanderList, ( aPanorama, this ) );
- topList->IExpander();
- topList->SetLabelSelectable( TRUE );
- topList->SetLabelTextRsrcID( 5000 );
-
- for ( eachLevel1 = 1; eachLevel1 <= 4; ++eachLevel1 ) {
- Str255 buffer;
-
- CExpanderList *aList = TCL_NEW( CExpanderList, ( topList, this, 0, 0, 20, 0 ) );
- aList->IExpander();
- aList->SetLabelTextRsrcID( 5000 + eachLevel1 );
- aList->SetLabelSelectable( TRUE );
-
- for ( eachLevel2 = 1; eachLevel2 <= 4; ++eachLevel2 ) {
-
- CExpanderList *aSubList = TCL_NEW( CExpanderList, ( aList, this, 0, 0, 20, 0 ) );
- aSubList->IExpander();
- aSubList->SetLabelSelectable( TRUE );
- aSubList->SetLabelTextRsrcID( 5005 + eachLevel2 );
-
- for ( eachLevel3 = 1; eachLevel3 <= 3; ++eachLevel3 ) {
- CExpanderList *aLabel = TCL_NEW( CExpanderList, ( aSubList, this, 0, 0, 20, 0 ) );
- aLabel->IExpander();
- aLabel->SetLabelSelectable( TRUE );
- aLabel->SetLabelTextRsrcID( 5009 + eachLevel3 );
-
- aSubList->AppendChild( aLabel );
- }
-
- aList->AppendChild( aSubList );
- }
-
- topList->AppendChild( aList );
- }
-
- aPanorama->AppendChild( topList );
-
- itsGopher = itsMainPane = aPanorama;
- }
-
-
- void CMain :: MakeNewContents( void )
- {
- ;
- }
-
-
- void CMain :: ContentsToWindow( void )
- {
- ;
- }
-
-
- void CMain :: WindowToContents( void )
- {
- ;
- }
-
-
-